LocaleListCompat
Helper for accessing features in LocaleList.
Functions
Link copied to clipboard
Creates a new instance of LocaleListCompat from the Locale array.
Link copied to clipboard
Generates a new LocaleList with the given language tags.
Link copied to clipboard
Returns the default locale list, adjusted by moving the default locale to its first position.
Link copied to clipboard
The result is guaranteed to include the default Locale returned by Locale.getDefault(), but not necessarily at the top of the list.
Link copied to clipboard
Retrieve an empty instance of LocaleListCompat.
Link copied to clipboard
Returns the first match in the locale list given an unordered array of supported locales in BCP 47 format.
Link copied to clipboard
Returns whether the LocaleListCompat contains no Locale items.
Link copied to clipboard
open fun matchesLanguageAndScript(@NonNull supported: @NonNull Locale, @NonNull desired: @NonNull Locale): Boolean
Determine whether two locales are considered a match, even if they are not exactly equal.
Link copied to clipboard
Retrieves a String representation of the language tags in this list.
Link copied to clipboard
Creates a new instance of LocaleListCompat from the Locale list.